<?php
App::uses('AppController', 'Controller');
//App::uses('SessionComponent', 'Controller/Component');

class BizonylatokControllerTest extends ControllerTestCase {
	
	public $fixtures = array('app.bizonylat', 'app.naplo', 'app.valuta', 'app.naplotipus',
									 'app.valutatetel', 'app.tetel', 'app.osztaly', 'app.gyujto_osztaly',
									 'app.gyujto', 'app.szamla', 'app.gyujto_tetel', 'core.session');
	
	public function setUp() {
		parent::setUp();
		$this->Bizonylatok = $this->generate('Bizonylatok',
														 array(
															'components' => array('Session',
																						 'DebugKit.Toolbar')
															)
														 );

		$this->controller->Session->expects($this->any())
			->method('read')
			->with($this->logicalOr('Settings.cegId', 'Settings.ev', 'Auth.User.id', 'Settings'))
			->will($this->returnCallback(
									function($param){
										if($param == 'Settings.cegId')
											return 2;
										elseif($param == 'Settings.ev')
											return 2012;
										elseif($param == 'Auth.User.id')
											return 1;
										elseif($param == 'Settings')
											return array('ev' => 2012, 'cegId' => 2);
										else
											return null;
									}
									));
	}

	public function testBizonylatokIndex(){
		$result = $this->testAction('/bizonylatok/index', array('return' => 'vars'));
		//debug($result);
	}

}
?>
